class HotForumItem {
  final String id;
  final String name;
  final String introduction;

  // 构造函数
  HotForumItem({
    required this.id,
    required this.name,
    required this.introduction,
  });

  // 从 JSON 创建对象
  factory HotForumItem.fromJson(Map<String, dynamic> json) {
    return HotForumItem(
      id: json['id'].toString(),
      name: json['name'],
      introduction: json['introduction'],
    );
  }

  // 转换为 JSON 格式
  Map<String, dynamic> toJson() {
    return {
      'id': id,
      'name': name,
      'introduction': introduction,
    };
  }
}
